package com.ssm.pojo;

import com.alibaba.excel.annotation.ExcelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Pattern;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Stu {
    @ExcelProperty("#")
    private int num;
    @ExcelProperty("学号")
    @Pattern(regexp = "(^[0-9]{4,14}$)", message = "学号应为4~14数字")
    private String number;
    @ExcelProperty("姓名")
    @Pattern(regexp = "(^[\\u4e00-\\u9fa5]{1,7})", message = "姓名应为1~7个汉字")
    private String sname;
    @ExcelProperty("性别")
    private int sex;
    @ExcelProperty("年龄")
    private int age;
    @ExcelProperty("电话")
    private String sphone;
    @ExcelProperty("宿舍楼")
    private String cdorm;
    @ExcelProperty("宿舍")
    private String sdorm;
}
